
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.sql.*" %>
 <%
     String path = request.getContextPath();
      String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
      %>

<html>
  <head>

    <base href="<%=basePath %>>">
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  
   
  </head>
  <body>
 
   <%
     Class.forName("org.sqlite.JDBC").newInstance();
      Connection con = DriverManager.getConnection("jdbc:sqlite:d:\\hj.db");
      Statement stmt=con.createStatement();
      ResultSet rs=stmt.executeQuery("select * from hj");
      out.println("<table>");
      while (rs.next()){
       out.println("<tr>");
          out.println("<td>"+rs.getString("xm")+"</td>");
           out.println("<td>"+rs.getString("xb")+"</td>");
           out.println("<td>"+rs.getString("tel")+"</td>");
           out.println("</tr>");
      }
	out.println("</table>");
    %>
    
  </ul>
  </body>
</html>
